package cn.shanks.dubbo.provider02.service.impl;

import cn.shanks.common.entity.Score;
import cn.shanks.common.service.ScoreService;
import cn.shanks.dubbo.provider02.mapper.ScoreMapper;
import org.apache.dubbo.config.annotation.DubboService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

@DubboService
public class ScoreServiceImpl implements ScoreService {

    @Autowired
    private ScoreMapper scoreMapper;

    @Override
    @Transactional
    public boolean addScore(Score score) {
        scoreMapper.insert(score);
        return true;
    }
}
